"""author: wenyao
   data: 2022/3/12
   project: pirate-king-2022
"""

# name = "cali"
# age = 18
# mystr = "%s %s" %(name, age)
# print(mystr)
#
# mystr = "{0} {1}".format(name, age)
# print(mystr)
#
# # 推荐 {变量名:[填充字符][对齐方式<^>][宽度][格式]}
# mystr = f"{name} {age}"
# print(mystr)
#
# #b=>二进制，o=>八进制,x=>十六进制
# mystr = f"{name} {age:b}"
# print(mystr)
#
#
# #f=>浮点数
# #.2f => 保留两位小数
# age = 3.1415926
# mystr = f"{name} {age:.2f}"
# print(mystr)
#
# # 推荐 {变量名:[填充字符][对齐方式<^>][宽度][格式]}
# info = "welcome"
# mystr = f"{info:*<30}"
# print(mystr)

#
#
# a = "str1"
# b = "str2"
# print(a+b)
# print("".join([a, b]))
# print("%s%s" %(a,b))
# print(f"{a}{b}")
# new_str = f"{a}{b}"
# print(len(new_str))
# print(new_str[6])
#
# # 布尔值 =》 True, False
# print(bool(""))
# print(bool(" "))
#
# PI = 3.1415926
# PI = 1